package com.mjk.common.ai.entity;

import com.fasterxml.jackson.databind.JsonNode;
import com.mjk.common.base.model.BaseEntity;
import com.mjk.common.core.jdbc.annotation.ArcSharding;
import com.mjk.common.core.jdbc.annotation.Filed;
import com.mjk.common.core.jdbc.annotation.Id;
import com.mjk.common.core.jdbc.service.idgenerator.IdGenerateType;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;

import java.time.LocalDateTime;

/**
 * Image generated by ai
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ArcSharding(dataSource = "pg", table = "adi_draw")
public class Draw extends BaseEntity {
    @Id(type = IdGenerateType.AUTO_UUID)
    private Long id;

    @Filed(cloum = "create_time")
    private LocalDateTime createTime;

    @Filed(cloum = "update_time")
    private LocalDateTime updateTime;

    @Filed(cloum = "is_deleted", comment = "是否删除（0：未删除，1：已删除）")
    private Boolean isDeleted;
    @Filed(cloum = "user_id", comment = "用户id")
    private Long userId;

    @Filed(cloum = "uuid")
    private String uuid;

    @Filed(cloum = "ai_model_id")
    private Long AiModelId;

    @Filed(cloum = "ai_model_name")
    private String AiModelName;

    @Filed(cloum = "prompt")
    private String prompt;

    @Filed(cloum = "negative_prompt")
    private String negativePrompt;

    @Filed(cloum = "generate_size")
    private String generateSize;

    @Filed(cloum = "generate_quality")
    private String generateQuality;

    @Filed(cloum = "generate_number")
    private Integer generateNumber;

    @Filed(cloum = "generate_seed")
    private Integer generateSeed;

    //    @TableField(value = "dynamic_params", jdbcType = JdbcType.JAVA_OBJECT, typeHandler = JsonNodeTypeHandler.class)
    private JsonNode dynamicParams;

    @Filed(cloum = "original_image", comment = "file uuid")
    private String originalImage;

    @Filed(cloum = "mask_image", comment = "file uuid")
    private String maskImage;

    @Filed(cloum = "resp_images_path")
    private String respImagesPath;

    @Filed(cloum = "generated_images", comment = "generated image uuids")
    private String generatedImages;

    @Filed(cloum = "interacting_method")
    private Integer interactingMethod;

    @Filed(cloum = "process_status")
    private Integer processStatus;

    @Filed(cloum = "process_status_remark")
    private String processStatusRemark;

    @Filed(cloum = "is_public")
    private Boolean isPublic;

    @Filed(cloum = "with_watermark")
    private Boolean withWatermark;

    @Filed(cloum = "star_count")
    private Integer starCount;
}
